package com.example.main.login

import com.example.lib_base.http.Cont
import com.example.lib_base.mvvm.Res
import com.example.main.entity.LoginEntity
import com.example.main.entity.RegisterEntity

import kotlinx.coroutines.flow.Flow
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Query

interface ApiService {
   @POST(Cont.LOGIN_URL)
   suspend fun login(@Query("username") username: String, @Query("password") password: String):Res<LoginEntity>
   @PUT("/api/user/modifyPwd")
   suspend fun getForget(@Query("userid") userid:Int,@Query("newPwd")newPwd:String):Res<Any>
   @POST("/api/user/register")
   suspend fun getRegister(@Query("username") username: String, @Query("password") password: String):Res<RegisterEntity>
}